import http from './http'

export function register (data) {
  return http.post('/register', data)
}

export function login (data) {
  return http.post('/login', data)
}

export function userLogOut (data) {
  return http.post('/logout', data)
}

export function newChat (data) {
  return http.post('/new_chat', data)
}

export function sendMessage (data) {
  return http.post('/send_message', data)
}

export function getConversations (params) {
  return http.get('/get_conversations', params)
}

export function getChatMessages (params) {
  return http.get('/get_chat_messages', params)
}

export function deleteConversation (data) {
  return http.post('/delete_conversation', data)
}

export function deleteUserConversations (data) {
  return http.post('/delete_user_conversations', data)
}

export function stream (params) {
  return http.getFile('/stream', params)
}
